To find a string, select the "Find..." of the menu "Search". Then a dialog box named "Find Settings" will appear as shown below.
Type the string that you want to search in the "Find:" field and push the "Find" button. Then searching will start from the current cursor position and if found, the string will be highlighted in the document.
To search for the next occurrence, push the "Find" button again. When there are no more occurrences, a beep sound will tell you that the search is over. You can also do this function by selecting the "Find Next" of the menu "Edit".
If you push the "Find All" button, all occurrences will be listed up in a mark list window as shown below.
If you double click on one item of the mark list, the corresponding line will appear in the document window.
If you push the button at the left side of the find field, the pop-up menu containing last 10 searched strings will appear. If you select an item, it will be copied into the find field.
To specify unprintable characters in the find field, use the following "\" key combinations:
If you want to search for non-printing characters, use the following combinations ("\" and a character) in the find field:
\t=TAB, \r=CR, \n=LF, \s=SPACE, \b=Backspace.
Other combinations using the "\" key will be explained later at the section of the Regular Expressions.
If you want to search for the text you see in the current document, select that text and use the "Enter 'Find' String" of the menu "Search". That text will be copied into the find field of the find dialog.
If you select the menu "Find Selection", the highlighted text will be copied into the find dialog and will be searched automatically.
If you check the box "Backwards", the search will start from the cursor position and go back to the top of the document.
Normally Jedit will stop searching when it reaches the end of the document. If you want to continue searching from the top of the document, check the box "Wrap Around".
If you check the box "Case Sensitive", Jedit will treat upper- and lowercase characters as different ones. Otherwise, it will ignore the difference of upper- and lowercases.
if you check the box "Hankaku/Zenkaku Sensitive", Jedit will treat hankaku and zenkaku characters as different ones. Otherwise, it will ignore the difference of hankaku and zenkaku. This option is valid in only the Japanese text. Check this when you use other languages.
If you check the box "Entire Word", Jedit matches the search string only if it is surrounded in the document text by word-break characters (white space or punctuation). Otherwise Jedit matches the search string anywhere in the text.
If you check the box " RegExp", you can use the patterns of the regular expressions in the find field. Using the expressions below, you can specify the word patterns without knowing the exact words contained in the text.
When you push the button, the help window for the regular expressions will appear:
Regular Expressions
Using the expressions below, you can specify the word patterns without knowing the exact words contained in the text. Jedit can also handle Japanese 2-bytes characters in the regular expressions.
^ beginning of line (if ^ is the first character in the pattern)
Example: ^subj:
searches for a pattern of text beginning with "subj:"
$ end of line (if $ is the last character in the pattern)
Example: ^$
searches for a blank line that only contains a carriage
return.
When you use "$", the searched result will not include the
carriage return.
If you use "\r", instead of "$", the searched result will
include the return code.
. represents any character
Example: a.d
will find words that begin with an "a", followed by any
character, then followed by a "d".
Possible matches: "and", "add", "dandy"
* means a designated character repeats more than once or never exists.
Example: an*d
will represent a word that starts with an "a", followed by
an "n" which is repeated 0 or more times, then followed
by a "d."
Possible matches: "and", "advance", "add"
+ means a designated character repeats more than once.
Example: an+d
will indicates any word that begins with an "a", followed by an "n"
which is repeated more than once, followed by a "d".
It matches in "and", "annd" but not "advance", "add".
? means a designated character exists once or never.
Example: an?d
will represent words begin with "a", followed by either "n" or
nothing, then followed by a "d". It matches in "and", "add" but not
"annd".
\ represents an escape mark
Use this escape mark to search for the characters such as '^',
'$', '\' that have the special meanings in the regular expression.
Example: \^ \\ \$ \* \+
You can also use that escape mark to search for none-printing
To express characters as hexadecimal codes, use '\h'
followed by its hexadecimal codes.
Example: \h20 1-byte space
Example: \h8140 2-bytes kanji space
[ ] represents character classes
To express the range of the characters, use [ - ] expression.
To express the exclusion of the characters, use [^ ] expression.
This function can also be used for 2-byte characters.
Example: [abc]
a character that matches for the characters a or b or c.
[A-Z]
a character that matches from A to Z, any capital alphabets.
[^a-z]
any character other than a to z.
[a-xABC]
any character from a to x or any of A, B, C.
[\t\s\h8140]+$
tabs, spaces or kanji spaces at the end of line.
{} represents a group
Use {} to divide find strings into desired groups that are
used in the replacement strings.
For example, a person name will be expressed as follows.
{[A-Z][a-z]+}\s+{[A-Z][a-z]+}
Expression {[A-Z][a-z]+} means one capital alphabet [A-Z] is
followed by more than one small letters [a-z]+.
First group {[A-Z][a-z]+} is the given name.
Second group {[A-Z][a-z]+} is the family name.
First group and Second group are separated by more than one
spaces \s+ .
You can specify the first group as \1 , and the second group as
\2. You can use these numbers in the Replacement process.
For example ,if you want to form the strings of personal names in
your document into the "family name first style", use the
following string as a replacement string.
\2, \1
And push the "Replace" button , then family names will come
first , a comma and given names will follow.
5.2 Replace
If you want to replace some string with the other string, use the replacement function. First, be sure to fill both the find and replacement field in the "Find Settings" dialog. Next, search for the find string by pushing the "Find" button or selecting the "Find Next" of the menu "Search".
When that string is found, then do the replacement process by the use of either the "Replace" and "Replace & Find" buttons in the find dialog or selecting the "Replace" and "Replace & Find Next" items in the menu "Search".
By selecting the "Replace & Find Next" of the menu "Search", the string will be replaced with the replacement string and the next occurrence of find string will be searched. You can do the same thing by pushing the button "Replace" or "Replace & Find" in the find dialog.
If you select the "Replace All" of the menu "Search" or in the find dialog, all the occurrences in the selected area will be replaced with the replacement string.
When the target area is not selected, the "Replace All" will be carried out from the cursor position to the end of the document.
If you push the button at the left side of the replace field, the pop-up menu containing last 10 replacement strings will appear. If you select an item, it will be copied into the replace field.
5.3 Multi-File Search & Replace
Jedit can find and replace strings on multiple files.
To switch from the normal search to the multi-file search mode, push the button . Then the button will turn to be the depressed shape indicating the multi-file search mode is on. By pushing the small arrow at left side of the button, you can show or hide the target file list for the multi-file search.
To add files to the target file list, push the "Add" button.
If your system supports Navigation Service, the following file dialog will appear. The files that match the "Readable File Types" in the "Open" preferences will be listed in the dialog.
Select more than one files in this dialog and push the "Choose" button. Then they will be added to the target file list. Also if you select a folder, all files contained within the folder and its subfolders will be added to the target file list.
If Navigation Service was not supported, the following selection dialog will appear.
Select the file you want to add to the target list, and push the "Add" button.
If you push the button "All Listed Files", all the files in the list box will be added to the target file list. If you push the button "All Files in the Folder", all the text files in the selected folder (including subfolders) will be added to the target file list.
To start the multi-file searching, push the button "Find" or "Find All" in the find dialog or select the "Find Next" or "Find All" of the menu "Search".
When you push the "Find" button, the document window opens each time the string is found. To continue searching, push the "Find" button again or select the menu "Find Next". If you want to end the search in the current document and make the next search in the next documets , select the "Find Next File" of the menu "Search".
To begin searching from the next file, select the menu "Find Next File".
Also in the multi-file search mode ,the "Replace & Find" button in the find dialog and the "Replace & Find Next" of the menu "Search" will do the same work as in the normal search mode.
If you push the button "Find All" in the find dialog or you select the "Find All" of the menu "Search", all the occurrences in the target files will be listed up in the mark list as shown below.
If you double click on one of the found items in the mark list, the corresponding text will appear in the document window. If you double click on the file item in the mark list, the corresponding file will be opened.
When you push the button "Replace All", all occurrences in the target files will be replaced with the replacement string and the following confirmation dialog will appear.
Warnimg: Don't forget to save the documents before closing them. Otherwise, you will lose the replacements you just made.
How to Use the Target File List in the "Find Setting Dialog"
If you want to remove a file from the target file list, select the name of that file and push the "Delete" button. If you want to clear all files from the list box, push the "Clear" button.
If you want to open a file in the target file list, double click on the name of that file.
The "" mark indicates that the file has not been searched yet. If you want to skip a file in the search, remove the "" mark at the left side of the file's name by clicking it. If you click the "" mark with the shift key down, all the " marks of the files located above from where you clicked will be removed.
If you use the same target list frequently, you can register that list in the "File Sets" pop-up menu. Push the "Register File Set" button, then the following dialog will appear.
Enter the name of the set you want to register and click the "Register" button, then the current target file list will be registered in the "File Sets" pop-up menu.
To use a registered file set, push the pop-up menu button and selet the name of set you want . Then the all the names of that set will appear in the target file list.
To remove a file set from the "File Sets" pop-up menu, push the pop-up menu button with the option key down and select the namen of file set you want to remove.
5.4 Sherlock FBC Search
MacOS 8.5 or higher supports "Sherlock Find By Contents (FCB)" function that allows you to quickly search contents of entire disks.
Jedit also supports Sherlock FBC search but it is slightly different from Finder's and more powerful. You may open the file and jump to the chosen search word directly
Select the "Sherlock FCB Search..." of the menu "Search". The following dialog box will appear:
Enter more than one word into "Words" field and check the boxes at the left side of the drives that you want to search.
The results will be displayed in the mark list as shown below. With Finder's Sherlock search, the results will only show the names of files that contain the searched words. However, when you use the Jedit's Sherlock, the results will also show the content locations of the searched words.
To see the corresponding text that includes the searched words, double click on the item from the list. Then that text will appear in the document window of Jedit.
Notes when Using Sherlock
1. You need to index the volumes before you use the Sherlock FCB
search. To index the volumes, select "Find..." from the "File" menu
of the Finder. Otherwise, select "Sherlock" from the Apple menu.
(For further details of indexing volumes for Sherlock, see "MacHelp".)
2. The mark list will display the first occurrence of each file. If you
want to list up all occurrences in that file, use Jedit's "Find All"
function for the file.
3. Sherlock can not search the files of none-Mac encodings. If you
want search the text files of none-Mac encodings such as JIS, EUC
or Unicode, use the multi-file search of Jedit instead.
5.5 Mark
You can mark the location of a certain text area in the document and make the list of those locations in the mark list. You can jump back to the marked text area from the mark list any time you want.
Highlight the text area you want to mark and select the "Mark" of the menu "Search", then the mark list will be opened automatically and the mark of that location will be registered onto the list.
You can also mark the text area by "Drag and Drop" of that text area onto the mark list directly.
If you want to jump to the marked text areas, double click on the corresponding items in the mark list.
5.6 Mark List
Go to the "Search" menu and select "Mark List", then the following mark list will appear:
The mark list can contain not only the lines that you have marked but also the searched results of "Find All" and "Sherlock FCB Search" functions.
You can show or hide marked items of a file by clicking the mark at the left side of the file items. If you want to show or hide all marked items on the list, click one of the marks with the option key down.
Jump
To open a file in the mark list by its creator application, double click on the file item.
To open the marked item in the mark list by Jedit, double click on the mark item to jump to the corresponding text. You can also open the mark by pushing the "Jump" button at top of the mark list.
When a file is already opened as a document of Jedit3.0, that file icon will be displayed in the shape instead of its original icon.
Remove
To remove a marked item from the mark list, select that item and push the "Delete" button. You can remove all marks of a file by selecting the file item and pushing the "Delete" button. To remove all marks in the mark list, push the "Clear All" button.
Jedit3.0 will never erase the mark items automatically. New search results will be added to the current mark list, and will remain in the list unless you remove.
Save to the Bookmark File
To save the current mark list, push the "Save" button. Otherwise, go to the "File" menu and select "Save/Save As...". When saved, the file will appear as the following bookmark icon:
If you want to open a bookmark file, double click on the icon.
The File "Manual Index" of this manual is actually a bookmark file that was created in this way.
Loading a Bookmark File
To add the contents of a bookmark file into the current mark list, push the "Append" button, and select a bookmark file. The contents of that file will then be added to the current mark list.
To clear the current mark list and open a bookmark list as the new mark list, go to the "File" menu and select "Open Bookmark...".
Dragging and Dropping Bookmark Files
To add a bookmark file to the current mark list, drag the bookmark file from the Finder desktop and drop it onto the mark list.
Update of the contents of the mark list
If a mark list is already open, the locations of the marks will be updated automatically as you make changes in the document window.
If you change contents in the document while its mark list is not open, the location data in the bookmark file may not exactly correspond to the contents of the current document.
In such a case, if you try to open that bookmark file, the following alert box will appear.
To update the contents of the mark list, push the "Update Marks" button. All the marks of that file will be updated. If you want to view the text that the old mark indicates, push the "Jump Now without Update" button.
When the File is Not Found
If Jedit3.0 can not find the file in the mark list, the following alert box will appear. All marks of this file will be removed.
Note when using Bookmark Files
As the file information in the bookmark list is stored in aliases, it follows up the file name changes or the file location changes automatically.
When moving a bookmark file and its related files to another folder or disk, be sure to maintain the relative positions between the files. For example, when you move the bookmark file and its related files within a certain folder, you should move the folder itself.
5.7 Jump by Line Number
Go to the "Search" menu and select "Go to Line/Paragraph", then the following dialog will appear.
Enter the line number or paragraph number where you want to jump and push the "Jump" button